package com.neusoft.movie.v_movies.model;


import com.neusoft.movie.v_movies.common.Constants;
import com.neusoft.movie.v_movies.listener.RetrofitListener;
import com.neusoft.movie.v_movies.service.MoviesService;
import com.neusoft.movie.v_movies.service.NewsService;

import retrofit2.Call;

/**
 * Created by Administrator on 2017/12/26.
 */

public class NewsModel extends RetrofitBaseModel {
    private NewsService newsService;


    public NewsModel() {
        this.newsService = retrofit.create(NewsService.class);
    }

    public void getNewslist(RetrofitListener listener) {
        Call call = newsService.getNewslist();
        bindCallback(call, listener, Constants.GETNEWSLIST);
    }

    public void getDetail(int n_id,RetrofitListener listener) {
        Call call = newsService.getDetail(n_id);
        bindCallback(call, listener, Constants.GETNEWDETAIL);
    }





}
